package com.yumei.trader.gym.page;

import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.widget.LinearLayout;

import com.yumei.trader.gym.R;
import com.yumei.trader.gym.client.BasePage;

public class PagePpExitApp extends BasePage {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.pop_exit_app);
        transparentBar();
        registerComponent();
    }

    private void registerComponent() {

        this.findViewById(R.id.btn_ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackAction(0x200);
            }
        });

        this.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackAction(0x199);
            }
        });

        LinearLayout contentLayout = this.findViewById(R.id.popup_content_layout);
        Animation scaleAnimation = android.view.animation.AnimationUtils.loadAnimation(this, R.anim.top_in);
        contentLayout.setAnimation(scaleAnimation);
    }
}
